package com.caregiver.watch.business.care.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 用户定位信息
 * @Author 疆戟
 * @Date 2025/9/27 18:03
 * @Version 1.0
 */
@Data
public class LocationDataVo {

    @Schema(description = "数据时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime dataTime;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "纬度")
    private BigDecimal latitude;


    public static LocationDataVo build(BigDecimal longitude, BigDecimal latitude, LocalDateTime dataTime) {
        LocationDataVo locationDataVo = new LocationDataVo();
        locationDataVo.longitude = longitude;
        locationDataVo.latitude = latitude;
        locationDataVo.dataTime = dataTime;
        return locationDataVo;
    }
}
